﻿using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.Account;
using Volo.Abp.Identity;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
using Microsoft.Extensions.DependencyInjection;
using ThridGroup.ERP.WarehouseManagement;
using ThridGroup.ERP.Application.WarehouseManagement;

namespace ThridGroup.ERP;

[DependsOn(
    typeof(ERPDomainModule),
    typeof(ERPApplicationContractsModule),
    typeof(AbpPermissionManagementApplicationModule),
    typeof(AbpFeatureManagementApplicationModule),
    typeof(AbpIdentityApplicationModule),
    typeof(AbpAccountApplicationModule),
    typeof(AbpTenantManagementApplicationModule),
    typeof(AbpSettingManagementApplicationModule)
    )]
public class ERPApplicationModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpAutoMapperOptions>(options =>
        {
            options.AddMaps<ERPApplicationModule>();
        });

        // 注册服务
        context.Services.AddTransient<IWarehouseSettingService, WarehouseSettingService>();
        context.Services.AddTransient<IWarehouseAreaSettingService, WarehouseAreaSettingService>();
        context.Services.AddTransient<IWarehouseLocationSettingService, WarehouseLocationSettingService>();
    }
}
